'use strict';
if (false) {
  var obj = {
    test: function () {
      const fn = () => {
        console.log(this); // obj
        const fnfn = () => {
          console.log(this) // obj
        }
        fnfn();
      }
      function fn1() {
        console.log(this); // window
      }
      fn();
      fn1();
    }
  }
  obj.test();
}
if (false) {
  var obj = {
    test: function (fn) {
      // console.log(this); // 1 obj 严格模式: obj
      fn();
    },
    test2: () => {
      console.log(this); // 4 window 严格模式: window
    }
  }
  obj.test(function () {
    console.log(this); // 2 window 严格模式: undefined
  })

  obj.test(() => {
    console.log(this); // 3 window 严格模式: window
  })

  obj.test2();
}
if (true) {
  var obj = {
    method() {
      console.log(this); // obj

      const f = function () {
        console.log(this); // window 严格模式: undefined
      }

      const fn = () => {
        console.log(this); // obj
      }

      f();
      fn();
    }
  }
  obj.method();
}


